from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.contrib import auth
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect

@login_required
def index(request, page=1):
    return render_to_response('main.html', {'page': page})

def logout(request):
    auth.logout(request)
    return HttpResponseRedirect('/cassaco')